<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Prettus\Repository\Contracts\Transformable;
use Prettus\Repository\Traits\TransformableTrait;

class PlatUserBank extends Model implements Transformable
{
    use TransformableTrait;

    protected $guarded = ['id'];

    //scope
    public function scopeDefault($query)
    {
        return $query->where('is_default', 1);
    }

    //relationship
    public function city()
    {
        return $this->belongsTo(ProvinceCity::class, 'city_id');
    }

}
